package hyh.com.videodemo;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ThreadPoolManager {

    private static ThreadPoolManager instance = new ThreadPoolManager();
    private ExecutorService executorService;

    public static ThreadPoolManager getInstance(){
        return instance;
    }

    private ThreadPoolManager(){
        executorService = Executors.newCachedThreadPool();
    }

    public void executor(Runnable runnable){
        executorService.execute(runnable);
    }
}
